<template>
	<view>
		<topbar :title="title" jt_c="2" background="background:#222222;color:#fff;"></topbar>
		<view class="content">
			<u-parse :html="url"></u-parse>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:'',
				url:'',
			};
		},
		onLoad(opt) {
			this.$.ajax(1,"POST","index/get_article",{
				id:opt.id,
			},(res)=>{
				if(res.code ==1){
					this.url = res.data.content
					this.title = res.data.title
				}else{
					this.$.ti_shi('文章内容获取失败')
				}
			})
		},
	}
</script>

<style lang="scss">
	.content{
		padding: calc(var(--status-bar-height) + 124rpx) 24rpx 0 24rpx;
		width: 100%;
	}
</style>
